<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
$App->sTitle = "Dropdown Menus";
$App->sHome = "/admin/treeview";

$App->AddOptionHeader('options', 'Options');
$App->AddOption('add', 'Add New Root Entry', 0, 'index.html?page=addEntry', 'options');
$App->AddOption('orderroot', 'Order Root Children', 0, 'index.html?page=orderChildren&ID=0', 'options');

//Set Access Requirements
if (!$BigDaddy->IsUserAllowedByAction("menu-admin"))
{
	header("Location: /");
	exit;
}

$navtrail=array(
"Home" => "/index.html",
"Admin" => "/admin/index.html",
);

$locationDir="/admin/treeview/";

switch ($_REQUEST["page"])
{
	case "addEntry":
		$pageParams["include"]=$_SERVER["DOCUMENT_ROOT"].$locationDir."addentry.inc";
		$navtrail["Treeview Management"]="index.html";
		$pageParams["title"] = "Dropdown Menu Management: Add Entry";
		break;
	case "editEntry":
		$pageParams["include"]=$_SERVER["DOCUMENT_ROOT"].$locationDir."editentry.inc";
		$navtrail["Treeview Management"]="index.html";
		$pageParams["title"] = "Dropdown Menu Management: Edit Entry";
		break;
	case "orderChildren":
		$pageParams["include"]=$_SERVER["DOCUMENT_ROOT"].$locationDir."orderchildren.inc";
		$navtrail["Treeview Management"]="index.html";
		$pageParams["title"] = "Dropdown Menu Management: Order Children";
		break;
	case "":
	default:
		$pageParams["title"] = "Dropdown Menu Management (BigDaddy)";
		break;
}



?>
